<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <script type="text/javascript" src="../jqtool/jquery.tools.min.js">
        </script>
        <style type="text/css">
            body {
                padding: 50px 80px;
                font-family: "Lucida Grande", "bitstream vera sans", "trebuchet ms", sans-serif, verdana;
            }
            
            /* get rid of those system borders being generated for A tags */
            a:active {
                outline: none;
            }
            
            a:focus {
                -moz-outline-style: none;
            }
        </style>
        <style>
            /* the overlayed element */ .apple_overlay {
                /* initially overlay is hidden */
                display: none;
                /* growing background image */
                background-image: url(./img/overlay/white.png);
                /*
                 width after the growing animation finishes
                 height is automatically calculated
                 */
                width: 640px;
                /* some padding to layout nested elements nicely  */
                padding: 35px;
                /* a little styling */
                font-size: 11px;
            }
            
            /* default close button positioned on upper right corner */ .apple_overlay .close {
                background-image: url(./img/overlay/close.png);
                position: absolute;
                right: 5px;
                top: 5px;
                cursor: pointer;
                height: 35px;
                width: 35px;
            }
        </style>
        <style type="text/css">
            /* use a semi-transparent image for the overlay */ #overlay {
                background-image: url(./img/overlay/transparent.png);
                color: #efefef;
                height: 450px;
            }
            
            /* container for external content. uses vertical scrollbar, if needed */
            div.contentWrap {
                height: 441px;
                overflow-y: auto;
            }
        </style>
        <script type="text/javascript">
        </script>
    </head>
    <body>
        <!-- external page is given in the href attribute (as it should be) -->
		<a href="external-content.htm" rel="#overlay" style="text-decoration:none">
			<!-- remember that you can use any element inside the trigger -->
            <button type="button">
                Show external page in overlay
            </button>
        </a>
        <!-- another link. uses the same overlay -->
		<a href="external-content2.htm" rel="#overlay" style="text-decoration:none">
            <button type="button">
                Show another page
            </button>
        </a>
        <!-- overlayed element -->
        <div class="apple_overlay" id="overlay">
            <!-- the external content is loaded inside this tag -->
            <div class="contentWrap">
            </div>
        </div>
        <script type="text/javascript">
            $(function(){
                // if the function argument is given to overlay,
                // it is assumed to be the onBeforeLoad event listener
                $("a[rel]").overlay({
                    mask: 'darkred',
                    effect: 'apple',
                    onBeforeLoad: function(){
                        // grab wrapper element inside content
                        var wrap = this.getOverlay().find(".contentWrap");
                        // load the page specified in the trigger
                        wrap.load(this.getTrigger().attr("href"));
                    }
                });
            });
        </script>
    </body>
</html>
